package com.test.multithread.orderPrint;

/**
 * @Author kings
 * @create 2024/6/23 18:23
 */
public class Excute {
    public static void main(String[] args) {

        PrintABC printABC=new PrintABC(3);

        Thread t1=new Thread(()->{
            try {
                printABC.printA();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        });
        t1.setName("A线程");


        Thread t2=new Thread(()->{
            try {
                printABC.printB();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        t2.setName("B线程");

        Thread t3=new Thread(()->{
            try {
                printABC.printC();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        });
        t3.setName("C线程");

        t2.start();
        t3.start();
        t1.start();



    }
}
